This invention relates to a vector mask control system for performing vector mask operations in a vector processing apparatus which executes vector operations for scientific computation.
Generally, it seldom occurs in processing vector data or other massive data that all the elements of the data are valid ones which should be processed. Rather, these elements often comprise a mixture of data to be processed and data which need not be processed. In light of this, a system has been customarily employed which, while making reference to mask information associated with individual data elements of an operand, performs an operation control on individual the data elements of the operand associated therewith.
In the above-described type of data processing apparatus instructions are selectively executed in two different modes, i.e., one which makes reference to mask information and the other which does not. For a vector mask control system whose operation is based on whether or not to make reference to mask information, reference can be made to a publication entitled "FEASIBILITY STUDY FOR A NUMERICAL AERODYNAMIC SIMULATION/DESCRIPTION" published in May 1979 by CONTROL DATA CORPORATION. In the disclosed processor, a system is utilized in which an instruction word includes a particular field for indicating whether or not to make reference to mask data and either one of the two modes of instruction execution is selected depending on the content of the field when the instruction word is decoded.
Specifically, when reference to a mask, or a mask reference as will hereinafter referred to, is specified, a result of an operation on an operand is validated or invalidated depending on the value of mask information associated with respective elements of the operand; when a mask reference is not specified, the result of the operation is always valid. How such processing actually proceeds will be described in detail.
Referring to FIG. 1, assume that there is a program in which vectors (I), (I) and (I) (I=element numbers 1.about.n) are defined and, when (I) is larger than 0, (I) should be obtained by (I)=F ( (I), (I)) (where F(x,y) is any desired function) and, when (I) is equal to or smaller than 0 (I), it should not be obtained, and that in such a condition it is desired to use a generalized subroutine as a routine for obtaining I). Then, the processing starts with identifying the content of (I), which is one of elements of an operand, in response to an operand compare instruction at the main routine side. A vector mask M (I) is generated which is M (I)=1 if (I) is larger than 0 and M (I)=0 if (I) is equal to or smaller than 0. Subsequently, the subroutine is executed with reference made to the vector mask M (I) . At this instant, the subroutine itself is often unaware of the above-mentioned mask control for generalized application purposes. In such a case, the prior art system which specifies a mask reference in an instruction word cannot use the subroutine in its original condition. The result is the need for another subroutine which specifies a mask reference in an instruction word intended for a masked operation, inviting a significant reduction in efficiency. That is, the prior art system lacks flexibility since it has to be furnished with two different kinds of subroutines for accommodating a user's programs.